package com.fz.service;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Service;

/**
 * Created by webrx on 2017-09-08.
 */
@Service(value="mylog") @Aspect
public class Log {

    @Before("execution(public * com.fz.entity..User.s*(..))")
    public void open(){
        System.out.println(" 数据库连接并打开");
    }

    @After("execution(public * com.fz.entity..*.*(..))")
    public void close(){
        System.out.println(" 数据库关闭");
    }
}
